1. Field of the Invention
The present invention relates to an audio encoding apparatus and audio decoding apparatus which adopt a hierarchical encoding/decoding method.
2. Description of the Prior Art
Heretofore, the aim of introducing an audio encoding apparatus and decoding apparatus which adopt the hierarchical encoding method which enables decoding audio signals from a part of a bitstream of encoded signals as well as all of it, is to cope with the case that a part of the packets of encoded audio signals are lost in a packet transmission network. An example of such apparatus based on the CELP (Code Excited Linear Prediction) encoding method comprises excitation signal encoding blocks in a multistage connection. This is disclosed in "Embedded CELP coding for variable bit-rate between 6.4 and 9.6 kbit/s" by R. Drog in proceedings of ICASSP, pp. 681-684, 1991 and "Embedded algebraic CELP coders for wideband speech coding" by A. Le Guyader, et. al. in proceedings of EUSIPCO, signal processing VI, pp. 527-530, 1992.
With reference to FIGS. 2A and 2B, the operation of an example of the prior art will be explained. Although only two excitation signal encoding blocks are connected in the example for simplicity, the following explanation can be extended to the structure of three or more stages.
Frame dividing circuit 101 divides an input signal into frames and supplies the frames to sub-frame dividing circuit
Sub-frame dividing circuit 102 divides the input signal in a frame into sub-frames and supplies the sub-frames to linear-predictive analysis circuit 103 and psychoacoustic weighting signal generating circuit 105.
Linear predictive analyzing circuit 103 applies linear predictive analysis to each sub-frame of the input from sub-frame dividing circuit 102 and supplies linear predictor coefficients a(i) (i=1,2,3, . . . , Np) to linear predictor coefficient quantizing circuit 104, psychoacoustic weighting signal generating circuit 105, psychoacoustic weighting signal reproducing circuit 106, adopt ive codebook searching circuit 109, multi-pulse searching circuit 110, and auxiliary multi-pulse searching circuit 112. Number Np in the former sentence represents the degree of linear predictive analysis and, for example may take a value of 10. The correlation method and the covariance method are two examples of linear predictive analysis and they are explained in detail in chapter five of "Digital Audio Processing" published by Tohkai University Press in Japan.
Linear predictor coefficient quantizing circuit 104 quantizes the linear predictor coefficients for each frame instead of sub-frame. In order to decrease bitrate, it is common to adopt the method in which only the last sub-frame in the present frame is quantized and the rest of the sub-frames in the frame are interpolated using the quantized linear predictor coefficients of the present frame and the preceding frame. The quantization and interpolation are executed after converting linear predictor coefficients to line spectrum pairs (LSP). The conversion from linear predictor coefficients to LSP is explained in "Speech data Compression by LSP Speech Analysis-Synthesis Technique" in Journal of the Institute of Electronics, Information and Communication Engineers, J64-A, pp. 599-606, 1981. Well-known methods can be used for quantizing LSP. One example of such methods is explained in Japanese Patent Laid-open 4-171500.
After converting quantized LSPs to quantized linear predictor coefficients a'(i) (i=1,2,3, . . . , Np), linear predictive coefficient quantizing circuit 104 supplies the quantized linear predictor coefficients to psychoacoustic weighting signal reproducing circuit 106, adaptive codebook searching circuit 109, multi-pulse searching circuit 110, and auxiliary multi-pulse searching circuit 112 and supplies indices representing quantized LSPs to multiplexer 114.
Psychoacoustic weighting signal generating circuit 105 drives the psychoacoustically weighting filter Hw(z) represented by equation (1) by input signal in a sub-frame to generate psychoacoustically weighted signal which is supplied to target signal generating circuit 108: ##EQU1##
where R.sub.1 and R.sub.2 are weighting coefficients which control the amount of psychoacoustic weighting. For example, R.sub.1 =0.6 and R.sub.2 =0.9.
Psychoacoustic weighting signal reproducing circuit 106 drives a psychoacoustically weighting synthesis filter by excitation signal of the preceding sub-frame which is supplied via sub-frame buffer 107. The psychoacoustic weighting synthesis filter consists of a linear predictive synthesis filter represented by equation (2) and psychoacoustically weighting filter Hw(z) in cascade connection whose coefficients are of the preceding sub-frame and have been held therein: ##EQU2##
After the driving, psychoacoustic weighting signal reproducing circuit 106 drives the psychoacoustically weighting synthesis filter by a series of zero signals to calculate the response to zero inputs. The response is supplied to target signal generating circuit 108.
Target signal generating circuit 108 subtracts the response to zero inputs from the psychoacoustic weighting signal to get target signals X(n) (n=0,1,2, . . . , N-1) . Number N in the former sentence represents the length of a sub-frame. Target signal generating circuit 108 supplies the target signals to adaptive codebook searching circuit 109, multi-pulse searching circuit 110, gain searching circuit 111, auxiliary multi-pulse searching circuit 112, and auxiliary gain searching circuit 113.
Using excitation signal of the preceding sub-frame supplied through sub-frame buffer 107, adaptive codebook searching circuit 109 renews an adaptive codebook which has held past excitation signals. Adaptive vector signal Ad(n) (n=0,1,2, . . . , N-1) corresponding to pitch d is a signal delayed by pitch d which has been stored in the adaptive codebook. Here, if pitch d is longer than the length of a sub-frame N, adaptive codebook searching circuit 109 detaches d samples just before the present sub-frame and repeatedly connects the detached samples until the number of the samples reaches the length of a sub-frame N. Adaptive codebook searching circuit 109 drives the psychoacoustic weighting synthesis filter which is initialized for each sub-frame (hereinafter referred to as a psychoacoustic weighting synthesis filter in zero-state) by the generated adaptive code vector Ad(n) (n=0,1,2, . . . , N-1) to generate reproduced signals SAd(n) (n=0,1,2, . . . , N-1) and selects pitche d' which minimizes error E(d), which is the difference between target signals X(n) and SAd(n), from a group of d within a predetermined searching range, for example d=17, . . . , 144. Hereinafter the selected pitch d' will be referred to as d for simplicity. ##EQU3##
Adaptive codebook searching circuit 109 supplies the selected pitch d to multiplexer 114, the selected adaptive code vector Ad (n) to gain searching circuit 111, and the regenerated signals SAd(n) to gain searching circuit 111 and multi-pulse searching circuit 110.
Multi-pulse searching circuit 110 searches for P pieces of non-zero pulse which constitute a multi-pulse signal. Here, the position of each pulse is limited to the pulse position candidates which were determined in advance. The pulse position candidates for a different non-zero pulse are different from one another. The non-zero pulses are expressed only by polarity. Therefore, the coding the multi-pulse signal is equivalent to selecting index j which minimizes error E(j) in equation (4): ##EQU4##
where SCj (n) (n=0,1,2, . . . , N-1) is a reproduced signal obtained by driving the psychoacoustic weighting synthesis filter in zero-state by multi-pulse signals Cj (n=0, 1,2, . . . , N-1) which is constituted for index j (j=0,1,2, . . . , J-1) which represents one of J pieces of combination of the pulse position candidate and the polarity, and X' (n) (n=0,1,2, . . . , N-1) is a signal obtained by orthogonalizing the target signal X(n) by the reproduced signal SAd(n) of the adaptive code vector signal and given by equation (5): ##EQU5##
This method is explained in detail in "Fast CELP coding 10 based on algebraic codes" in proceedings of ICASSP, pp. 1957-1960, 1987.
Index j representing the multi-pulse signal can be transmitted with ##EQU6##
bits where M(p)(p=0,1,2, . . . , P-1) is the number of the pulse position candidates for the p-th pulse. For example, the number of bits necessary to transmit index j is 20 provided that sampling rate is 8 kHz, the length of a sub-frame is 5 msec (N =40 samples), the number of pulses P is five, the number of the pulse position candidates M(p)=8, p=0,1,2, . . . , P-1, and the number of the pulse position candidates is, for simplicity, constant.
Multi-pulse searching circuit 110 supplies selected multi-pulse signal Cj (n) and the reproduced signal SCj (n) for the multi-pulse signal to gain searching circuit 111 and corresponding index j to multiplexer 114.
Gain searching circuit 111 searches for the optimum gain consisting of GA(k) and GE(K) (k=0,1,2, . . . , K-1) for a pair of the adaptive code vector signal and the multi pulse signal from again codebook of size K. Index k of the optimum gain is selected so as to minimize error E(k) in equation (6): ##EQU7##
where X(n) is the target signal, SAd(n) is the reproduced adaptive code vector, and SCj (n) is the reproduced multi-pulse signal.
Gain searching circuit 111 also generates excitation signal D(n) (n=0,1,2, . . . , N-1) using the selected gain, the adaptive code vector, and the multi-pulse pulse signal. Excitation signal D(n) is supplies to sub-frame buffer 107 and auxiliary multi-pulse searching circuit 112. Moreover, gain searching circuit 111 drives the psychoacoustic weighting filter in zero-state by excitation signal D(n) to generate reproduced excitation signal SD(n) (n=0,1,2, . . . , N-1) which is supplied to auxiliary multi-pulse searching circuit 112, auxiliary gain searching circuit 113, and multiplexer 114.
Similarly to multi-pulse searching circuit 110, auxiliary multi-pulse searching circuit 112 generates auxiliary multi-pulse signal Cm(n) (n=0,1,2, . . . , N-1) and regenerated auxiliary multi-pulse signal SCm(n) (n=0,1,2, . . . , N-1) and selects m which minimizes error E(m) in equation (7): ##EQU8##
where X" (n) (n 32 0,1,2, . . . , N-1) is a signal obtained by orthogonalizing target signal X(n) by reproduced signal SD(n) of the excitation signal and given by equation (8): ##EQU9##
Index m representing multi-pulse signal C(m) can be transmitted with ##EQU10##
bits where P' is the number of auxiliary multi-pulse signals and M' (p) (p 32 0,1,2, . . . , P'-1) is the number of the pulse position candidates for p-th pulse. For example, the number of bits necessary to transmit index m is 20 provided that the number of pulses P' is five, the number of the pulse position candidates for each pulse M' (p) is 8, p=0,1,2, . . . , P'-1, and the number of the pulse position candidates is, for simplicity, constant.
Auxiliary multi-pulse searching circuit 112 also supplies regenerated signal SCm(n) to auxiliary gain searching circuit 113 and corresponding index m to multiplexer 114.
Auxiliary gain searching circuit 113 searches for the optimum gain consisting of GEA(l) and GEC(l) (l=0,1,2, . . . , K'-1) for a pair of the excitation signal and the auxiliary multi-pulse signal from a gain codebook of size K'. Index l of the optimum gain is selected so as to minimize error E(l) in equation (9) ##EQU11##
where X(n) is the target signal, SD(n) is the reproduced excitation signal, and SCm(n) is the reproduced auxiliary multi-pulse signal.
Selected index l is supplied to multiplexer 114.
Multiplexer 114 converts indices, which correspond to the quantized LSP, the adaptive code vector, the multi-pulse signal, the gains, the auxiliary multi-pulse signal and the auxiliary gains, into a bitstream which is supplied to first output terminal 115.
Bitstream from second input terminal 117 is supplied to demultiplexer 117. Demultiplexer 117 converts the bitstream into the indices which correspond to the quantized LSP, the adaptive code vector, the multi-pulse signal, the gains, the auxiliary multi-pulse signal and the auxiliary gains. Demultiplexer 117 also supplies the index of the quantized LSP to linear predictor coefficient decoding circuit 118, the index of the pitch to adaptive codebook decoding circuit 119, the index of the multi-pulse signal to multi-pulse decoding circuit 120, the index of the gains to gain decoding circuit 121, the index of the auxiliary multi-pulse signal to auxiliary multi-pulse decoding circuit 124, and the index of the auxiliary gains to auxiliary gain decoding circuit 125.
Linear predictor coefficient decoding circuit 118 docodes the index of the quantized LSP to quantized linear predictor coefficients a' (i) (i=1,2,3, . . . , Np) which is supplied to first signal reproducing circuit 122 and second signal reproducing circuit 126.
Adaptive codebook decoding circuit 119 decodes the index of the pitch to adaptive code vector Ad(n) which is supplied to gain decoding circuit 121. Multi-pulse decoding circuit 120 decodes the index of the multi-pulse signal to multi-pulse signal Cj(n) which is supplied to gain decoding circuit 121. Gain decoding circuit 121 decodes the index of the gains to gains GA(k) and GC(k) and generates a first excitation signal using gains GA(k) and GC(k), adaptive code vector Ad(n), multi-pulse signal Cj(n) and gains GA(k) and GC(k). The first excitation signal is supplied to first signal reproducing circuit 122 and auxiliary gain decoding circuit 125.
First signal reproducing circuit 122 generates a first reproduced signal by driving linear predictive synthesis filter Hs(z) with the first excitation signal. The first reproduced signal is supplied to second output terminal 123.
Auxiliary multi-pulse decoding circuit 124 decodes the index of the auxiliary multi-pulse signal to auxiliary multi-pulse signal Cm(n) which is supplied to auxiliary gain decoding circuit 125. Auxiliary gain decoding circuit 125 decodes the index of the auxiliary gains to auxiliary gains GEA(l) and GEC (l) and generates a second excitation signal using the first excitation signal, auxiliary multi-pulse signal Cm(n) and auxiliary gains GEA(l) and GEC(l).
Second signal reproducing circuit 126 generates a second reproduced signal by driving linear predictive synthesis filter Hs(z) with the second excitation signal. The second reproduced signal is supplied to third output terminal 127.
The conventional method explained above has a disadvantage that coding efficiency of a multi-pulse signal in the second stage and following stages is not sufficient because there is a possibility that each stage locates pulses in the same positions with those of pulses encoded in former stages. Because a multi-pulse signal is represented by positions and polarities of pulses, the same multi-pulse is formed when plural pulses are located in the same position and when one pulse is located therein. Therefore, coding efficiency is not improved when plural pulses are located in the same position.